<?php 
require_once("admin-header.php");
require_once("../maincore.php");
if (!defined("THNOJ")) die ("Outside of the site");

$id=intval($_GET['id']);
$sql="SELECT `defunct` FROM `news` WHERE `news_id`=$id";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
$defunct=$row[0];
echo $defunct;
mysql_free_result($result);

$sql="update news set defunct=if(defunct='Y','N','Y') where news_id=$id";

mysql_query($sql) or die(mysql_error());
?>
<script language=javascript>
	history.go(-1);
</script>
